#pragma once
#include "IApplication.hpp"

class Context;
struct GfxConfiguration
{
	unsigned width;
	unsigned height;
	const char* appName;
};

class BaseApplication : public IApplication
{
public:
	static BaseApplication* GetInstance() { return instance_; }
	BaseApplication(GfxConfiguration& cfg);

	virtual int Initialize();
	virtual void Finalize();
	virtual void Tick();

	virtual bool IsQuit();
protected:
	bool quit_{ false };
	GfxConfiguration config_{960,640,""};
	Context* context_{ nullptr };
private:
	static BaseApplication* instance_;
	BaseApplication() {};
};
